"""
证书模块序列化器
"""
from rest_framework import serializers
from .models import Certificate


class CertificateSerializer(serializers.ModelSerializer):
    """证书序列化器"""
    
    class Meta:
        model = Certificate
        fields = ['id', 'sort', 'name', 'ranks', 'classes', 'grade']
        read_only_fields = ['id']
